package com.ruoyi.tranShort.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tranShort.mapper.ShortSchedulingDetailMapper;
import com.ruoyi.tranShort.domain.ShortSchedulingDetail;
import com.ruoyi.tranShort.service.IShortSchedulingDetailService;

/**
 * 排班明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-14
 */
@Service
public class ShortSchedulingDetailServiceImpl implements IShortSchedulingDetailService 
{
    @Autowired
    private ShortSchedulingDetailMapper shortSchedulingDetailMapper;

    /**
     * 查询排班明细
     * 
     * @param id 排班明细主键
     * @return 排班明细
     */
    @Override
    public ShortSchedulingDetail selectShortSchedulingDetailById(Long id)
    {
        return shortSchedulingDetailMapper.selectShortSchedulingDetailById(id);
    }

    /**
     * 查询排班明细列表
     * 
     * @param shortSchedulingDetail 排班明细
     * @return 排班明细
     */
    @Override
    public List<ShortSchedulingDetail> selectShortSchedulingDetailList(ShortSchedulingDetail shortSchedulingDetail)
    {
        return shortSchedulingDetailMapper.selectShortSchedulingDetailList(shortSchedulingDetail);
    }

    /**
     * 新增排班明细
     * 
     * @param shortSchedulingDetail 排班明细
     * @return 结果
     */
    @Override
    public int insertShortSchedulingDetail(ShortSchedulingDetail shortSchedulingDetail)
    {
        shortSchedulingDetail.setCreateTime(DateUtils.getNowDate());
        return shortSchedulingDetailMapper.insertShortSchedulingDetail(shortSchedulingDetail);
    }

    /**
     * 修改排班明细
     * 
     * @param shortSchedulingDetail 排班明细
     * @return 结果
     */
    @Override
    public int updateShortSchedulingDetail(ShortSchedulingDetail shortSchedulingDetail)
    {
        return shortSchedulingDetailMapper.updateShortSchedulingDetail(shortSchedulingDetail);
    }

    /**
     * 批量删除排班明细
     * 
     * @param ids 需要删除的排班明细主键
     * @return 结果
     */
    @Override
    public int deleteShortSchedulingDetailByIds(Long[] ids)
    {
        return shortSchedulingDetailMapper.deleteShortSchedulingDetailByIds(ids);
    }

    /**
     * 删除排班明细信息
     * 
     * @param id 排班明细主键
     * @return 结果
     */
    @Override
    public int deleteShortSchedulingDetailById(Long id)
    {
        return shortSchedulingDetailMapper.deleteShortSchedulingDetailById(id);
    }
}
